<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let user = {};
      const m1 = new WeakMap();
      m1.set(user, { name: "jack", age: 20 });
      let u = m1.get(user);
      user = null; // m1.set(user, null);
      u = null;
      console.log(u);
    </script>
  </body>
</html>
